package com.itany.corejava.code08_常用类.string类;

/**
 * @author 石小俊
 * 2024年07月19日 13:30
 */
public class Test01_创建方式 {

    public static void main(String[] args) {
        String s1 = new String("admin");
        String s2 = new String("admin");
        System.out.println(s1 == s2);

        String s3 = "admin";
        String s4 = "admin";
        System.out.println(s3 == s4);

        String s5 = new String(new char[]{'a', 'd', 'm', 'i', 'n'});
        System.out.println(s5);

        String s6 = 1 + "";
        System.out.println(s6);
    }

}
